import { AxiosResponse } from 'axios'
import { LoginFrom } from '@/types/views/login'
import { ResponseData } from '@/types/api/public'
import request from '@/request'


/**
 * @desc: 获取管理员信息
 * @param { Object } 
 */
export const getManagerData = (data: LoginFrom) => {  
    return request({
        url: '/manager',
        method: 'get',
        params:data
    })
}



/* *
*@desc: 修改管理员
* @param { Object } 
*/
export const putManagerData = (data: LoginFrom) => {
    let datas = {...data}
    console.log(datas);
    
    return request({
    url: '/manager/'+datas['id'],
    method: 'put',
    data:{...datas}
    })
}

/* @desc: 管理员信息删除
* @param { Object } 
*/
export const delManagerData = (data: LoginFrom) => {
    return request({
        url: '/manager/'+data,
        method: 'delete',
    })
}
/* @desc: 管理员信息添加
* @param { Object } 
*/
export const postManagerData = (data: LoginFrom) => {
    let datas = {...data}
    return request({
        url: '/manager',
        method: 'post',
        data:{...datas}
    })
}